﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/AdminMasterPage.master" AutoEventWireup="true"
    CodeFile="AddEdit.aspx.cs" Inherits="Admin_Supplier_AddEdit" %>

<asp:Content ID="Content2" ContentPlaceHolderID="pnlMain" runat="Server">
    <div id="divError" runat="server">
    </div>
    <table cellpadding="0" cellspacing="0">
        <tr>
            <td>
                Supplier Name
            </td>
            <td>
                <asp:TextBox ID="txtSupplierName" MaxLength="200" Width="200" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvSupplierName" Display="Dynamic" runat="server"
                    ControlToValidate="txtSupplierName" ErrorMessage="Supplier Name is required"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>
                Username
            </td>
            <td>
                <asp:TextBox ID="txtUsername" MaxLength="50" Width="200" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvUsername" Display="Dynamic" runat="server" ControlToValidate="txtUsername"
                    ErrorMessage="Username is required"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr id="trPassword" runat="server">
            <td>
                Password
            </td>
            <td>
                <asp:TextBox ID="txtPassword" MaxLength="50" Width="200" runat="server" TextMode="Password"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvPassword" Display="Dynamic" runat="server" ControlToValidate="txtPassword"
                    ErrorMessage="Password is required"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr id="trConfirmPassword" runat="server">
            <td>
                Confirm Password
            </td>
            <td>
                <asp:TextBox ID="txtConfirmPassword" MaxLength="50" Width="200" runat="server" TextMode="Password"></asp:TextBox><asp:RequiredFieldValidator
                    ID="RequiredFieldValidator2" Display="Dynamic" runat="server" ControlToValidate="txtConfirmPassword"
                    ErrorMessage="Confirm Password is required"></asp:RequiredFieldValidator><asp:CompareValidator
                        ID="CompareValidator1" runat="server" ErrorMessage="Confirm Password does not match with passsword"
                        ControlToCompare="txtPassword" ControlToValidate="txtConfirmPassword"></asp:CompareValidator>
            </td>
        </tr>
        <tr>
            <td>
                Email Address
            </td>
            <td>
                <asp:TextBox ID="txtEmailAddress" MaxLength="200" Width="200" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvEmailAddress" Display="Dynamic" runat="server"
                    ControlToValidate="txtEmailAddress" ErrorMessage="Email Address is required"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="revEmailAddress" runat="server" Display="Dynamic"
                    ControlToValidate="txtEmailAddress" ErrorMessage="Invalid Email Address " ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td>
                Pay On Arrival
            </td>
            <td>
                <asp:CheckBox ID="chkPayOnArrival" runat="server" />
            </td>
        </tr>
        <tr>
            <td>
                Display Name
            </td>
            <td>
                <asp:TextBox ID="txtDisplayName" MaxLength="200" Width="200" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvDisplayName" Display="Dynamic" runat="server"
                    ControlToValidate="txtDisplayName" ErrorMessage="Display Name is required"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>
                Fuel Policy
            </td>
            <td>
                <asp:DropDownList ID="ddlFualPolicy" runat="server" Width="200px">
                </asp:DropDownList>
                <asp:RequiredFieldValidator ID="rfvFualPolicy" InitialValue="0" Display="Dynamic"
                    runat="server" ControlToValidate="ddlFualPolicy" ErrorMessage="Fuel Policy is required"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>
                Booking Threshold
            </td>
            <td>
                <asp:TextBox ID="txtBookingThreshold" Width="200" runat="server"></asp:TextBox>
                (in minutes)
                <asp:RequiredFieldValidator ID="rfvBookingThreshold" Display="Dynamic" runat="server"
                    ControlToValidate="txtBookingThreshold" ErrorMessage="Booking Threshold is required"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="revBookingThreshold" runat="server" Display="Dynamic"
                    ControlToValidate="txtBookingThreshold" ErrorMessage="Invalid Booking Threshold "
                    ValidationExpression="\d*"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td>
                Grace Period Mins
            </td>
            <td>
                <asp:TextBox ID="txtGracePeriodMins" Width="200" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvGracePeriodMins" Display="Dynamic" runat="server"
                    ControlToValidate="txtGracePeriodMins" ErrorMessage="Grace Period Mins is required"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="revGracePeriodMins" runat="server" Display="Dynamic"
                    ControlToValidate="txtGracePeriodMins" ErrorMessage="Invalid Grace Period Mins "
                    ValidationExpression="\d*"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td>
                Navigator
            </td>
            <td>
                <asp:CheckBox ID="chkNavigator" runat="server" AutoPostBack="True" Checked="True"
                    OnCheckedChanged="chkNavigator_CheckedChanged" />
            </td>
        </tr>
        <tr>
            <td>
                Navigator Rent Price
            </td>
            <td>
                <asp:TextBox ID="txtNavRentPrice" Width="200" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvNavRentPrice" Display="Dynamic" runat="server"
                    ControlToValidate="txtNavRentPrice" ErrorMessage="Navigator Rent Price is required"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="revNavRentPrice" runat="server" Display="Dynamic"
                    ControlToValidate="txtNavRentPrice" ErrorMessage="Invalid Navigator Rent Price "
                    ValidationExpression="\d{1,3}(?:\.\d{1,2})?$"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td>
                Navigator Rent Sell Price
            </td>
            <td>
                <asp:TextBox ID="txtNavRentSellPrice" Width="200" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvNavRentSellPrice" Display="Dynamic" runat="server"
                    ControlToValidate="txtNavRentSellPrice" ErrorMessage="Navigator Rent Sell Price is required"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="revNavRentSellPrice" runat="server" Display="Dynamic"
                    ControlToValidate="txtNavRentSellPrice" ErrorMessage="Invalid Navigator Rent Sell Price "
                    ValidationExpression="\d{1,3}(?:\.\d{1,2})?$"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td>
                Navigator Fix Rent Price
            </td>
            <td>
                <asp:TextBox ID="txtNavFixRentPrice" Width="200" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvNavFixRentPrice" Display="Dynamic" runat="server"
                    ControlToValidate="txtNavFixRentPrice" ErrorMessage="Navigator Fix Rent Price is required"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="revNavFixRentPrice" runat="server" Display="Dynamic"
                    ControlToValidate="txtNavFixRentPrice" ErrorMessage="Invalid Navigator Fix Rent Price "
                    ValidationExpression="\d{1,3}(?:\.\d{1,2})?$"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td>
                Navigator Fix Rent Sell Price
            </td>
            <td>
                <asp:TextBox ID="txtNavFixRentSellPrice" Width="200" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvNavFixRentSellPrice" Display="Dynamic" runat="server"
                    ControlToValidate="txtNavFixRentSellPrice" ErrorMessage="Navigator Fix Rent Sell Price is required"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="revNavFixRentSellPrice" runat="server" Display="Dynamic"
                    ControlToValidate="txtNavFixRentSellPrice" ErrorMessage="Invalid Navigator Fix Rent Sell Price "
                    ValidationExpression="\d{1,3}(?:\.\d{1,2})?$"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td>
                Additional Drive Rent Price
            </td>
            <td>
                <asp:TextBox ID="txtAddDriveRentPrice" Width="200" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvAddDriveRentPrice" Display="Dynamic" runat="server"
                    ControlToValidate="txtAddDriveRentPrice" ErrorMessage="Additional Drive Rent Price is required"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="revAddDriveRentPrice" runat="server" Display="Dynamic"
                    ControlToValidate="txtAddDriveRentPrice" ErrorMessage="Invalid Additional Drive Rent Price "
                    ValidationExpression="\d{1,3}(?:\.\d{1,2})?$"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td>
                Additional Drive Rent Sell Price
            </td>
            <td>
                <asp:TextBox ID="txtAddDriveRentSellPrice" Width="200" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvAddDriveRentSellPrice" Display="Dynamic" runat="server"
                    ControlToValidate="txtAddDriveRentSellPrice" ErrorMessage="Additional Drive Rent Sell Price is required"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="revAddDriveRentSellPrice" runat="server" Display="Dynamic"
                    ControlToValidate="txtAddDriveRentSellPrice" ErrorMessage="Invalid Additional Drive Rent Sell Price "
                    ValidationExpression="\d{1,3}(?:\.\d{1,2})?$"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:Button ID="btnSave" runat="server" Text="Save" OnClick="btnSave_Click" />&nbsp;&nbsp;<asp:Button
                    ID="btnCancel" runat="server" CausesValidation="false" Text="Cancel" OnClick="btnCancel_Click" />
            </td>
        </tr>
    </table>
</asp:Content>
